# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libopusenc
pkgver=0.2.1
pkgrel=0
pkgdesc="Library for encoding .opus audio files and live streams"
url="https://opus-codec.org"
arch="all"
license="BSD-3-Clause"
makedepends="opus-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://archive.mozilla.org/pub/opus/libopusenc-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="adf30cacea9ac2e5889a40147f53943a1bec5279c5ff3a9b09de8ca52727a6cbaeecd338417fc5856e337ae183c85b0d366d14ec4ec329de12d50709a6f6507a  libopusenc-0.2.1.tar.gz"
